<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="user" uri="/WEB-INF/tags/UserDescriptor.tld"%>
<%@taglib prefix="usererror" uri="/WEB-INF/tags/ErrorTag.tld"%>

<t:basicTemplate pageTitle="SWIMv2 - My Friends">
	<jsp:attribute name="extrahead">
		<link rel='stylesheet' href='css/search.css' type='text/css' />
	</jsp:attribute>
	<jsp:body>
		<h1>My friends</h1>
		<div class="error-style">
				<usererror:errors error="${param.error}" />
		</div>
		<ul>
		<%@include file="FriendSearch.jsp"%>
		 
		 
		<c:forEach items="${friends}" var="friend">
	    	<div id="userDisplay">
	    		<user:display username="${friend['username']}"
						surname="${friend['surname']}" name="${friend['name']}"
						email="${friend['email']}" category="${friend['category']}"
						image="${friend['image']}" />
			</div>
	    </c:forEach>
		
		
    	</ul>
    </jsp:body>
</t:basicTemplate>